
from flask_migrate import MigrateCommand, Migrate
from flask_script import Manager
from projects import app, db

# 数据库迁移  db迁移添加
Migrate(app=app, db=db)
# 导入manager管理  让manager来管理flask，我们可以通过python manage.py来运行
manager = Manager(app)
manager.add_command('db', MigrateCommand)


@app.route('/')
def index():
    return 'index'


if __name__ == '__main__':
    app.run()
    # manager.run()
